package com.tmsps.ne4weixin.bean.message.custom;

import com.tmsps.ne4weixin.bean.message.custom.vo.Article;
import com.tmsps.ne4weixin.bean.message.custom.vo.News;
import com.tmsps.ne4weixin.config.enumeration.MsgTypeEnum;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @Title: NewsMessage.java
 * @Package: com.tmsps.ne4weixin.bean.custom
 * @Description: 客服消息-发送图文消息
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class NewsMessage extends BaseMessage {

	/**
	 * 图文消息内容
	 */
	private News news;
	 
	public NewsMessage(String touser) {
		super(touser, MsgTypeEnum.NEWS);
	}
	
	public NewsMessage(String touser, String title, String description, String url, String picurl) {
		super(touser, MsgTypeEnum.NEWS);
		this.news = new News(new Article(title, description, url, picurl));
	}
	
	public NewsMessage(String touser,News news) {
		super(touser, MsgTypeEnum.NEWS);
		this.news = news;
	}
	
	public NewsMessage(String touser,Article article) {
		super(touser, MsgTypeEnum.NEWS);
		this.news = new News(article);
	}
}
